#ifndef QARCWIDGET_H
#define QARCWIDGET_H

#include "../widgets/qwidgethost.h"

#include <QWidget>

class QArcWidget : public QWidget
{
    Q_OBJECT
    Q_PROPERTY(int line_width READ lineWidth WRITE setLineWidth)
    Q_PROPERTY(int start_angle READ startAngle WRITE setStartAngle)
    Q_PROPERTY(int span_angle READ spanAngle WRITE setSpanAngle)
public:
    explicit QArcWidget(QWidget *parent = 0);
    
    void    setLineWidth(int lineWidth);
    int     lineWidth();

    void    setStartAngle(int startAngle);
    int     startAngle();

    void    setSpanAngle(int spanAngle);
    int     spanAngle();
protected:
    void paintEvent(QPaintEvent *);
signals:
    
public slots:
protected:
    int     m_line_width;
    int     m_start_angle;
    int     m_span_angle;
};

class QArcWidgetHost : public QWidgetHost
{
    Q_OBJECT
public:
    Q_INVOKABLE QArcWidgetHost(QAbstractHost *parent = 0);

    static QString get_show_name();
    static QString get_show_icon();
    static QString get_show_group();
public slots:
    void    setLineWidth(int lineWidth);
    int     lineWidth();

    void    setStartAngle(int startAngle);
    int     startAngle();

    void    setSpanAngle(int spanAngle);
    int     spanAngle();

    void    setLineStyle(int lineStyle);
    int     lineStyle();
protected:
    void init_property();
protected:
    void    create_object();
};


#endif // QARCWIDGET_H
